<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Danh sách nhà cung cấp</title>
</head>

<body>
<?PHP
	require ('models/m_ncc.php'); 
	dbconnect();
	//$allnxb = getbyall_nxb();
	
	if(isset($_POST['xoa2']) and isset($_POST['data'])) 
	{
		$id_array = $_POST['data']; // return array
		$id_count = count($_POST['data']); // count array
			for($i=0; $i < $id_count; $i++) 
					{
					$id = $id_array[$i];
					$query = mysql_query("DELETE FROM Nha_cung_cap WHERE ID = '$id'");
					if(!$query) { die(mysql_error()); }
					}
	
	}
	
	require ('v_ncc.php'); 
	
?>
</body>
</html>